-
Notifications
You must be signed in to change notification settings - Fork 955
feat(FieldGroup): add clear prop
#5511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v4
Are you sure you want to change the base?
Conversation
commit: |
| </UButton> | ||
|
|
||
| <template #footer="{ close }"> | ||
| <UFieldGroup clear> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't look intuitive since this FieldGroup's purpose is to cancel the previous one and not be one. We should do that automatically on all components with nested content that could be used in a FieldGroup.
We could make a new component to wrap the Modal, Slideover, Popover contents which voids the Button Group injection internally:
<NestedContent> <!-- provide(fieldGroupInjectionKey, null) -->
<slot name="content"> ... </slot>
</NestedContent>There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed it might be better that manually having to wrap buttons every time. Could we just call useFieldGroup() in those components? π€
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need a separate component, the trick is that the trigger should inherit from the FieldGroup injection, while the content shouldn't
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you can't just override the injection in the modal component for example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I mentioned a potential solution to this #4242 (comment)
π Linked issue
Resolves #5045, related to #4242
β Type of change
π Description
π Checklist